package com.ardan1.client.editor;

import java.util.List;

import com.ardan1.shared.Address;
import com.google.gwt.core.client.GWT;
import com.google.gwt.editor.client.EditorError;
import com.google.gwt.editor.client.HasEditorErrors;
import com.google.gwt.editor.ui.client.ValueBoxEditorDecorator;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

public class AddressEditor extends Composite implements HasEditorErrors<Address> {

	interface AddressEditorUiBinder extends UiBinder<Widget, AddressEditor> {
    }
	
	@UiField
	ValueBoxEditorDecorator<String> cityEditor;

	private static AddressEditorUiBinder uiBinder = GWT.create(AddressEditorUiBinder.class);
	
    public AddressEditor() {
    	initWidget(uiBinder.createAndBindUi(this));
    }

	@Override
	public void showErrors(List<EditorError> errors) {
		GWT.log("Wow" + errors);
		
	}
}